package cn.edu.xhu.library_management.book.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 
 * @TableName lm_book_category
 */
@TableName(value ="lm_book_category")
@Data
public class LmBookCategory implements Serializable {
    /**
     * 
     */
    @TableId(value = "bc_id", type = IdType.AUTO)
    private Long bcId;

    /**
     * 
     */
    @TableField(value = "bc_code")
    private String bcCode;

    /**
     * 
     */
    @TableField(value = "bc_name")
    private String bcName;

    /**
     * 
     */
    @TableField(value = "bc_parant_id")
    private Long bcParantId;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LmBookCategory other = (LmBookCategory) that;
        return (this.getBcId() == null ? other.getBcId() == null : this.getBcId().equals(other.getBcId()))
            && (this.getBcCode() == null ? other.getBcCode() == null : this.getBcCode().equals(other.getBcCode()))
            && (this.getBcName() == null ? other.getBcName() == null : this.getBcName().equals(other.getBcName()))
            && (this.getBcParantId() == null ? other.getBcParantId() == null : this.getBcParantId().equals(other.getBcParantId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBcId() == null) ? 0 : getBcId().hashCode());
        result = prime * result + ((getBcCode() == null) ? 0 : getBcCode().hashCode());
        result = prime * result + ((getBcName() == null) ? 0 : getBcName().hashCode());
        result = prime * result + ((getBcParantId() == null) ? 0 : getBcParantId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bcId=").append(bcId);
        sb.append(", bcCode=").append(bcCode);
        sb.append(", bcName=").append(bcName);
        sb.append(", bcParantId=").append(bcParantId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}